home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / tools / xr.sty < prev    next >
Text File  |  1997-03-07  |  2KB  |  63 lines

  1. %%
  2. %% This is file `xr.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% xr.dtx  (with options: `package')
  8. %% 
  9. %% IMPORTANT NOTICE:
  10. %% 
  11. %% This file is a generated file from the sources of the `tools' bundle
  12. %% in the LaTeX2e distribution.
  13. %% 
  14. %% For the copyright notice see the source file(s).
  15. %% 
  16. %% You are not allowed to modify this file.
  17. %% 
  18. %% You are allowed to distribute this file if and only if
  19. %% it is distributed with the corresponding source files in
  20. %% the `tools' bundle.
  21. %% 
  22. %% For the copying and distribution conditions of the source files,
  23. %% see the file readme.txt distributed with the tools bundle.
  24. %% 
  25. %% File: xr.dtx Copyright (C) 1993-1994 David Carlisle
  26. \NeedsTeXFormat{LaTeX2e}
  27. \ProvidesPackage{xr}
  28.          [1994/05/28 v5.02 eXternal References (DPC)]
  29. \def\externaldocument{\@ifnextchar[\XR@{\XR@[]}}
  30. \def\XR@[#1]#2{{%
  31.   \makeatletter
  32.   \def\XR@prefix{#1}%
  33.   \XR@next#2.aux\relax\\}}
  34. \def\XR@next#1\relax#2\\{%
  35.   \edef\XR@list{#2}%
  36.   \XR@loop{#1}}
  37. \def\XR@aux{%
  38.   \ifx\XR@list\@empty\else\expandafter\XR@explist\fi}
  39.  
  40. \def\XR@explist{\expandafter\XR@next\XR@list\\}
  41. \def\XR@loop#1{\openin\@inputcheck#1\relax
  42.   \ifeof\@inputcheck
  43.     \PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
  44.     \expandafter\XR@aux
  45.   \else
  46.     \PackageInfo{xr}{IMPORTING LABELS FROM #1}%
  47.     \expandafter\XR@read\fi}
  48. \def\XR@read{%
  49.   \read\@inputcheck to\XR@line
  50.   \expandafter\XR@test\XR@line...\XR@}
  51. \long\def\XR@test#1#2#3#4\XR@{%
  52.   \ifx#1\newlabel
  53.     \newlabel{\XR@prefix#2}{#3}%
  54.   \else\ifx#1\@input
  55.      \edef\XR@list{\XR@list#2\relax}%
  56.   \fi\fi
  57.   \ifeof\@inputcheck\expandafter\XR@aux
  58.   \else\expandafter\XR@read\fi}
  59.  
  60. \endinput
  61. %%
  62. %% End of file `xr.sty'.
  63.